3.1.25 \(\int \frac {a-b x^2}{a^2+(-1+2 a b) x^2+b^2 x^4} \, dx\)

Optimal. Leaf size=29 \[ \frac {1}{2} \log \left (a+b x^2+x\right )-\frac {1}{2} \log \left (a+b x^2-x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {1164, 628} \begin {gather*} \frac {1}{2} \log \left (a+b x^2+x\right )-\frac {1}{2} \log \left (a+b x^2-x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a - b*x^2)/(a^2 + (-1 + 2*a*b)*x^2 + b^2*x^4),x]

[Out]

-Log[a - x + b*x^2]/2 + Log[a + x + b*x^2]/2

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1164

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(-2*d)/e - b/c, 2]},
 Dist[e/(2*c*q), Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x
 - x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] &&  !GtQ[b^2
- 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {a-b x^2}{a^2+(-1+2 a b) x^2+b^2 x^4} \, dx &=-\left (\frac {1}{2} \int \frac {\frac {1}{b}+2 x}{-\frac {a}{b}-\frac {x}{b}-x^2} \, dx\right )-\frac {1}{2} \int \frac {\frac {1}{b}-2 x}{-\frac {a}{b}+\frac {x}{b}-x^2} \, dx\\ &=-\frac {1}{2} \log \left (a-x+b x^2\right )+\frac {1}{2} \log \left (a+x+b x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 29, normalized size = 1.00 \begin {gather*} \frac {1}{2} \log \left (a+b x^2+x\right )-\frac {1}{2} \log \left (a+b x^2-x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a - b*x^2)/(a^2 + (-1 + 2*a*b)*x^2 + b^2*x^4),x]

[Out]

-1/2*Log[a - x + b*x^2] + Log[a + x + b*x^2]/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a-b x^2}{a^2+(-1+2 a b) x^2+b^2 x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a - b*x^2)/(a^2 + (-1 + 2*a*b)*x^2 + b^2*x^4),x]

[Out]

IntegrateAlgebraic[(a - b*x^2)/(a^2 + (-1 + 2*a*b)*x^2 + b^2*x^4), x]

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 25, normalized size = 0.86 \begin {gather*} \frac {1}{2} \, \log \left (b x^{2} + a + x\right ) - \frac {1}{2} \, \log \left (b x^{2} + a - x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x, algorithm="fricas")

[Out]

1/2*log(b*x^2 + a + x) - 1/2*log(b*x^2 + a - x)

________________________________________________________________________________________

giac [A]  time = 0.24, size = 25, normalized size = 0.86 \begin {gather*} \frac {1}{2} \, \log \left (b x^{2} + a + x\right ) - \frac {1}{2} \, \log \left (b x^{2} + a - x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x, algorithm="giac")

[Out]

1/2*log(b*x^2 + a + x) - 1/2*log(b*x^2 + a - x)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 26, normalized size = 0.90 \begin {gather*} -\frac {\ln \left (b \,x^{2}+a -x \right )}{2}+\frac {\ln \left (b \,x^{2}+a +x \right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x)

[Out]

-1/2*ln(b*x^2+a-x)+1/2*ln(b*x^2+a+x)

________________________________________________________________________________________

maxima [A]  time = 1.04, size = 25, normalized size = 0.86 \begin {gather*} \frac {1}{2} \, \log \left (b x^{2} + a + x\right ) - \frac {1}{2} \, \log \left (b x^{2} + a - x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x, algorithm="maxima")

[Out]

1/2*log(b*x^2 + a + x) - 1/2*log(b*x^2 + a - x)

________________________________________________________________________________________

mupad [B]  time = 4.41, size = 12, normalized size = 0.41 \begin {gather*} \mathrm {atanh}\left (\frac {x}{b\,x^2+a}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a - b*x^2)/(x^2*(2*a*b - 1) + a^2 + b^2*x^4),x)

[Out]

atanh(x/(a + b*x^2))

________________________________________________________________________________________

sympy [A]  time = 0.47, size = 26, normalized size = 0.90 \begin {gather*} - \frac {\log {\left (\frac {a}{b} + x^{2} - \frac {x}{b} \right )}}{2} + \frac {\log {\left (\frac {a}{b} + x^{2} + \frac {x}{b} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x**2+a)/(a**2+(2*a*b-1)*x**2+b**2*x**4),x)

[Out]

-log(a/b + x**2 - x/b)/2 + log(a/b + x**2 + x/b)/2

________________________________________________________________________________________